using System.ComponentModel;
using FreeSql;
using FreeSql.DataAnnotations;

namespace BootBlazorApp1.Model;

public class Role:BaseEntity<Role,int>
{
    [Description("角色名称")]
    public string RoleName { get; set; }
    public int ParentId { get; set; }
    [Navigate(nameof(ParentId))]
    public Role? Parent { get; set; }
    [Navigate(nameof(ParentId))]
    public List<Role>? Children { get; set; }
    
    [Navigate(ManyToMany = typeof(RoleMenu))]
    public List<Menu> Menus { get; set; }
}